package com.winai.launcher.override.font;

import android.content.Context;
import android.graphics.Typeface;

public class FontTTF {
    // fongUrl是自定义字体分类的名称
    private static String OPPOSansH = "OPPOSans-H.ttf";
    private static String OPPOSansR = "OPPOSans-R.ttf";
    private static String OPPOSansM = "OPPOSans-M.ttf";
    private static String SIMHEI = "SIMHEI.TTF";

    /**
     * 设置字体
     */
    public static Typeface setHeavyFont(Context context) {
            //给它设置你传入的自定义字体文件，再返回回来
        return Typeface.createFromAsset(context.getAssets(), OPPOSansH);
    }
    /**
     * 设置字体
     */
    public static Typeface setMediumFont(Context context) {
        //给它设置你传入的自定义字体文件，再返回回来
        return Typeface.createFromAsset(context.getAssets(), OPPOSansM);
    }
    /**
     * 设置字体
     */
    public static Typeface setRegularFont(Context context) {
            //给它设置你传入的自定义字体文件，再返回回来
        return Typeface.createFromAsset(context.getAssets(), OPPOSansR);
    }
    /**
     * 设置字体
     */
    public static Typeface setSimHeiFont(Context context) {
        //给它设置你传入的自定义字体文件，再返回回来
        return Typeface.createFromAsset(context.getAssets(), SIMHEI);
    }
}
